home *** CD-ROM | disk | FTP | other *** search
/ Complete Linux / Complete Linux.iso / docs / apps / database / ingres04.lzh / source / iutil / ingresname.c < prev    next >
Encoding:
C/C++ Source or Header  |  1992-09-18  |  656 b   |  31 lines

  1. # include    <ingres.h>
  2. # include    <sccs.h>
  3.  
  4. SCCSID(@(#)ingresname.c    8.1    12/31/84)
  5.  
  6. /*
  7. **  MAKE INGRES FILE NAME
  8. **
  9. **    The null-terminated string 'iname' is converted to a
  10. **    file name as used by the ingres relations.  The name
  11. **    of the relation is padded out to be MAXNAME bytes long,
  12. **    and the two-character id 'id' is appended.  The whole
  13. **    thing will be null-terminated and put into 'outname'.
  14. **
  15. **    'Outname' must be at least MAXNAME + 3 bytes long.
  16. */
  17.  
  18. ingresname(iname, id, outname)
  19. char    *iname;
  20. char    *id;
  21. char    *outname;
  22. {
  23.     register char    *p;
  24.     extern char    *pmove();
  25.  
  26.     p = outname;
  27.     p = pmove(iname, p, MAXNAME, ' ');
  28.     bmove(id, p, 2);
  29.     p[2] = '\0';
  30. }
  31.